import yagmail

def em(flie):
    email = yagmail.SMTP(user='zzh2834326498@qq.com',password='rbtbgahnvdwaddbf',host='smtp.qq.com',port='465')
    email.send(to='zzh2834326498@qq.com',subject='测试报告',contents='请查收',
               attachments=flie)